// Code generated by smithy-go-codegen DO NOT EDIT.

package s3

import (
	
	awsmiddleware 
	
	s3cust 
	
	
	smithyhttp 
)

// Returns the notification configuration of a bucket. If notifications are not
// enabled on the bucket, the action returns an empty NotificationConfiguration
// element. By default, you must be the bucket owner to read the notification
// configuration of a bucket. However, the bucket owner can use a bucket policy to
// grant permission to other users to read this configuration with the
// s3:GetBucketNotification permission. For more information about setting and
// reading the notification configuration on a bucket, see Setting Up Notification
// of Bucket Events
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html). For
// more information about bucket policies, see Using Bucket Policies
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html). The
// following action is related to GetBucketNotification:
//
// * PutBucketNotification
// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketNotification.html)
func ( *Client) ( context.Context,  *GetBucketNotificationConfigurationInput,  ...func(*Options)) (*GetBucketNotificationConfigurationOutput, error) {
	if  == nil {
		 = &GetBucketNotificationConfigurationInput{}
	}

	, ,  := .invokeOperation(, "GetBucketNotificationConfiguration", , , .addOperationGetBucketNotificationConfigurationMiddlewares)
	if  != nil {
		return nil, 
	}

	 := .(*GetBucketNotificationConfigurationOutput)
	.ResultMetadata = 
	return , nil
}

type GetBucketNotificationConfigurationInput struct {

	// The name of the bucket for which to get the notification configuration.
	//
	// This member is required.
	Bucket *string

	// The account ID of the expected bucket owner. If the bucket is owned by a
	// different account, the request fails with the HTTP status code 403 Forbidden
	// (access denied).
	ExpectedBucketOwner *string

	noSmithyDocumentSerde
}

// A container for specifying the notification configuration of the bucket. If this
// element is empty, notifications are turned off for the bucket.
type GetBucketNotificationConfigurationOutput struct {

	// Enables delivery of events to Amazon EventBridge.
	EventBridgeConfiguration *types.EventBridgeConfiguration

	// Describes the Lambda functions to invoke and the events for which to invoke
	// them.
	LambdaFunctionConfigurations []types.LambdaFunctionConfiguration

	// The Amazon Simple Queue Service queues to publish messages to and the events for
	// which to publish messages.
	QueueConfigurations []types.QueueConfiguration

	// The topic to which notifications are sent and the events for which notifications
	// are generated.
	TopicConfigurations []types.TopicConfiguration

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata

	noSmithyDocumentSerde
}

func ( *Client) ( *middleware.Stack,  Options) ( error) {
	 = .Serialize.Add(&awsRestxml_serializeOpGetBucketNotificationConfiguration{}, middleware.After)
	if  != nil {
		return 
	}
	 = .Deserialize.Add(&awsRestxml_deserializeOpGetBucketNotificationConfiguration{}, middleware.After)
	if  != nil {
		return 
	}
	if  = addSetLoggerMiddleware(, );  != nil {
		return 
	}
	if  = awsmiddleware.AddClientRequestIDMiddleware();  != nil {
		return 
	}
	if  = smithyhttp.AddComputeContentLengthMiddleware();  != nil {
		return 
	}
	if  = addResolveEndpointMiddleware(, );  != nil {
		return 
	}
	if  = v4.AddComputePayloadSHA256Middleware();  != nil {
		return 
	}
	if  = addRetryMiddlewares(, );  != nil {
		return 
	}
	if  = addHTTPSignerV4Middleware(, );  != nil {
		return 
	}
	if  = awsmiddleware.AddRawResponseToMetadata();  != nil {
		return 
	}
	if  = awsmiddleware.AddRecordResponseTiming();  != nil {
		return 
	}
	if  = addClientUserAgent();  != nil {
		return 
	}
	if  = smithyhttp.AddErrorCloseResponseBodyMiddleware();  != nil {
		return 
	}
	if  = smithyhttp.AddCloseResponseBodyMiddleware();  != nil {
		return 
	}
	if  = swapWithCustomHTTPSignerMiddleware(, );  != nil {
		return 
	}
	if  = addOpGetBucketNotificationConfigurationValidationMiddleware();  != nil {
		return 
	}
	if  = .Initialize.Add(newServiceMetadataMiddleware_opGetBucketNotificationConfiguration(.Region), middleware.Before);  != nil {
		return 
	}
	if  = addMetadataRetrieverMiddleware();  != nil {
		return 
	}
	if  = addGetBucketNotificationConfigurationUpdateEndpoint(, );  != nil {
		return 
	}
	if  = addResponseErrorMiddleware();  != nil {
		return 
	}
	if  = v4.AddContentSHA256HeaderMiddleware();  != nil {
		return 
	}
	if  = disableAcceptEncodingGzip();  != nil {
		return 
	}
	if  = addRequestResponseLogging(, );  != nil {
		return 
	}
	return nil
}

func ( string) *awsmiddleware.RegisterServiceMetadata {
	return &awsmiddleware.RegisterServiceMetadata{
		Region:        ,
		ServiceID:     ServiceID,
		SigningName:   "s3",
		OperationName: "GetBucketNotificationConfiguration",
	}
}

// getGetBucketNotificationConfigurationBucketMember returns a pointer to string
// denoting a provided bucket member valueand a boolean indicating if the input has
// a modeled bucket name,
func ( interface{}) (*string, bool) {
	 := .(*GetBucketNotificationConfigurationInput)
	if .Bucket == nil {
		return nil, false
	}
	return .Bucket, true
}
func ( *middleware.Stack,  Options) error {
	return s3cust.UpdateEndpoint(, s3cust.UpdateEndpointOptions{
		Accessor: s3cust.UpdateEndpointParameterAccessor{
			GetBucketFromInput: getGetBucketNotificationConfigurationBucketMember,
		},
		UsePathStyle:                   .UsePathStyle,
		UseAccelerate:                  .UseAccelerate,
		SupportsAccelerate:             true,
		TargetS3ObjectLambda:           false,
		EndpointResolver:               .EndpointResolver,
		EndpointResolverOptions:        .EndpointOptions,
		UseARNRegion:                   .UseARNRegion,
		DisableMultiRegionAccessPoints: .DisableMultiRegionAccessPoints,
	})
}